package cn.dakaqi.services;

import cn.dakaqi.entities.PassportApplyOrder;
import cn.dakaqi.entities.PassportApplyOrderPatch;
import cn.dakaqi.utils.exception.ServiceRuntimeException;
import org.springframework.data.domain.Page;

/**
 * Copyright: Copyright (c)2016
 * Company: 志愿者打卡器(www.dakaqi.cn)
 * 类名称: PassportApplyOrderService <br>
 * 类描述: <br>
 *
 * @author: ChunYang.Zhang
 * @since: 2016/10/20 9:21
 * @version: 1.0.0
 */
public interface PassportApplyOrderService
{
    PassportApplyOrder save(PassportApplyOrder passportApplyOrder)throws ServiceRuntimeException;
    PassportApplyOrder update(PassportApplyOrder passportApplyOrder)throws ServiceRuntimeException;
    void saveAndUpdate(PassportApplyOrder newOrder,PassportApplyOrder oldOrder)throws ServiceRuntimeException;
    Page<PassportApplyOrder> findByBaseAddressId(Long baseAddressId,int status,int pageNumber)throws ServiceRuntimeException;
    Page<PassportApplyOrder> findByStatusLogOut(Long baseAddressId,int pageNumber)throws ServiceRuntimeException;
    PassportApplyOrder findOne(Long id)throws ServiceRuntimeException;
    PassportApplyOrder findByNum(Long baseAddressId,int status,String num)throws ServiceRuntimeException;
    Page<PassportApplyOrder> findByNum(Long baseAddressId,int status,String num,int pageNumber)throws ServiceRuntimeException;
    PassportApplyOrder findByCardNO(Long baseAddressId,int status,String cardNO)throws ServiceRuntimeException;
    PassportApplyOrder findByMobile(Long baseAddressId,int status,String mobile)throws ServiceRuntimeException;
    Page<PassportApplyOrder> findByCardNO(Long baseAddressId,String cardNO,int status,int pageNumber)throws ServiceRuntimeException;
    Page<PassportApplyOrder> findByPassportNO(Long baseAddressId,String passportNO,int status,int pageNumber)throws ServiceRuntimeException;
    PassportApplyOrder findAllNum(String num)throws ServiceRuntimeException;
    PassportApplyOrder findAllCardNO(String cardNO)throws ServiceRuntimeException;
    PassportApplyOrder findByPassportNO(String passportNO)throws ServiceRuntimeException;
    PassportApplyOrder findByRealnameAndNum(String realName,String num)throws ServiceRuntimeException;
    void lock(Long id,PassportApplyOrderPatch patch)throws ServiceRuntimeException;
    String createPassportNO()throws ServiceRuntimeException;
}
